<?php if (!empty($albums_data)) { ?>
  <?php foreach ($albums_data as $album) { ?>
    <a title="<?php echo $album['album_name']; ?>" href="<?php echo base_url('album/' . $album['album_id']); ?>" style="text-decoration: none;">
      <li class="span3">
        <div class="thumbnail album_thumbanil">
          <?php if (!empty($album['album_cover_photo'])) { ?>
            <img class="album_div_img" src="<?php echo base_url('assets/albums/' . $album['album_id'] . '/' . substr($album['album_cover_photo'], 0, 32) . '_thumb.jpg'); ?>" />
          <?php } else { ?>
            <img class="album_div_img" src="<?php echo base_url('assets/img/no_image_available.jpg'); ?>" />
          <?php } ?>
          <h6><?php echo mb_substr($album['album_name'], 0, 25) . '...'; ?></h6>
        </div>
      </li>
    </a>
  <?php } ?>
<?php } ?>